package org.azmat.mybatis.SQL.Service.Impl;

import org.azmat.mybatis.SQL.Entity.Employee;
import org.azmat.mybatis.SQL.Mapper.EmployeeMapper;
import org.azmat.mybatis.SQL.Service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Employee findEmployeeById(int id) {
        return employeeMapper.findEmployeeById(id);
    }

    // 查询领导和所有员工
    @Override
    public Employee findLeaderAndEmployees(int id) {
        return employeeMapper.findLeaderAndEmployees(id);
    }

}
